Closed
Bug 1021142
Opened 11 years ago
Closed 11 years ago
refresh_product_info_block leaks file handle on failure
Categories
(Toolkit :: Application Update, defect)
Toolkit
Application Update
Tracking
()
RESOLVED
FIXED
mozilla34
People
(Reporter: mccr8, Assigned: shashank, Mentored)
References
(Blocks 1 open bug)
Details
(Keywords: coverity, memory-leak, Whiteboard: [CID 1123276] )
Attachments
(1 file)
1.21 KB,
patch
|
bbondy
:
review+
|
Details | Diff | Splinter Review |
fp = fopen(path, "r+b");
...
if (fread(&additionalBlockSize,
sizeof(additionalBlockSize),
1, fp) != 1) {
// fp isn't closed
return -1;
}
...
if (fread(&additionalBlockID,
sizeof(additionalBlockID),
1, fp) != 1) {
// fp isn't closed
return -1;
}
Comment 1•11 years ago
|
||
Can you provide a DXR link to that, and I'll shop it around?
Whiteboard: [CID 1123276] → [CID 1123276] [mentor=mccr8]
Reporter | ||
Comment 2•11 years ago
|
||
Updated•11 years ago
|
Mentor: continuation
Whiteboard: [CID 1123276] [mentor=mccr8] → [CID 1123276]
Assignee | ||
Comment 3•11 years ago
|
||
Do two simple 'fclose(fp)' statements suffice?
Reporter | ||
Comment 4•11 years ago
|
||
Yes, I think so.
Assignee | ||
Comment 5•11 years ago
|
||
Attachment #8479512 -
Flags: review?(continuation)
Reporter | ||
Comment 6•11 years ago
|
||
Comment on attachment 8479512 [details] [diff] [review]
BUG 1021142 - 'fclose()' at 2 places to avoid leaks on failure r=mccr8
Review of attachment 8479512 [details] [diff] [review]:
-----------------------------------------------------------------
Is this something you could review, Brian? Thanks.
Attachment #8479512 -
Flags: review?(continuation) → review?(netzen)
Comment 7•11 years ago
|
||
Comment on attachment 8479512 [details] [diff] [review]
BUG 1021142 - 'fclose()' at 2 places to avoid leaks on failure r=mccr8
Review of attachment 8479512 [details] [diff] [review]:
-----------------------------------------------------------------
Sorry for the delay and thanks for the patch!
Attachment #8479512 -
Flags: review?(netzen) → review+
Reporter | ||
Comment 8•11 years ago
|
||
I'll do a try run later today.
Assignee: nobody → shashank
Flags: needinfo?(continuation)
Reporter | ||
Comment 9•11 years ago
|
||
Flags: needinfo?(continuation)
Reporter | ||
Comment 11•11 years ago
|
||
Well, I can just land it myself.
https://hg.mozilla.org/integration/mozilla-inbound/rev/af568e909c62
Keywords: checkin-needed
Comment 12•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
Updated•7 years ago
|
Blocks: coverity-analysis
You need to log in
before you can comment on or make changes to this bug.
Description
•